package com.web.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.web.model.User;
import com.web.service.UserService;

@RestController
@RequestMapping("/user")
public class UserAction {

	@Autowired
	UserService userService;
	
	@RequestMapping(value={"/selectUserById"}, method=RequestMethod.GET)
    public User selectUserById(int userId){
        User user = userService.getUser(userId);
        return user;
    }
}
